package phase2.rd;

import java.io.PrintStream;

/**
 * 
 * 
 * @author John Girata
 * @version Dec 5, 2012
 */
public class Node {
	public static final String VALUE_SEPARATOR = " ";
	
	private static int counter;
	
	private int id;
	private String value;
	
	public Node(String value) {
		this.value = value;
		
		id = counter++;
	}
	
	public int getId() {
		return id;
	}

	public String getValue() {
		return value;
	}

	public void print(PrintStream out) {
		out.println(id + VALUE_SEPARATOR + value);
	}
}
